4 # Usage: update_adium_from_bundle SOURCE_BUNDLE_PATH LANGUAGE_NAME
6 # ~/bin/update_adium_from_bundle Desktop/Adium_French.app French
8 # Set REPO to your Adium repository
10 # This script does not cover new localizations initially; they must first be
21 # Update a nib. First argument is the name of the nib,
22 # with the .nib extension. Second argument is the destination folder.
23 # The nib must already exist in the destination.
26 for file in $1/*.nib
; do
31 # Copy all nibs and other files in the current directory to a given destination
34 find .
'(' -name "*.nib" ')' -prune -execdir cp "{}/classes.nib" "$1/{}" ';'
35 find .
'(' -name "*.nib" ')' -prune -execdir cp "{}/keyedobjects.nib" "$1/{}" ';'
36 find .
'(' -name "*.nib" ')' -prune -execdir cp "{}/objects.xib" "$1/{}" ';'
39 if [ -f "$file" ] ; then
61 #first parameter to update_language is the language
64 echo "+++++ Updating $LANG"
66 silent_pushd
"$SOURCE/Contents"
68 silent_pushd
"Resources"
71 loc_copy
"$REPO/Resources/$LANG"
75 if [ -e "Emoticons" ] ; then
77 silent_pushd Emoticons
78 silent_pushd Default.AdiumEmoticonset
79 if [ -e "Resources/$LANG" ] ; then
80 silent_pushd Resources
/$LANG
81 cp InfoPlist.
strings "$REPO/Resources/Emoticons/Default.AdiumEmoticonSet/Resources/$LANG"
87 echo "No Emoticons found for $LANG"
91 if [ -e "Scripts" ] ; then
94 silent_pushd
"System Statistics.AdiumScripts"
95 if [ -e "Resources/$LANG" ] ; then
96 silent_pushd Resources
/$LANG
97 cp InfoPlist.
strings "$REPO/Resources/Scripts/System Statistics.AdiumScripts/Resources/$LANG"
103 echo "No Scripts found for $LANG"
109 silent_pushd Frameworks
110 echo "Adium Framework"
111 if [ -e "Adium.framework/Versions/A/Resources/$LANG" ] ; then
112 silent_pushd Adium.framework
/Versions
/A
/Resources
/$LANG
113 loc_copy
"$REPO/Frameworks/Adium Framework/Resources/$LANG"
117 #No localized resources
118 #silent_pushd AIHyperlinks.framework/Versions/A/Resources/$LANG
119 # loc_copy "$REPO/Frameworks/AIHyperlinks Framework/Resources/$LANG"
122 echo "AIUtilities.framework"
123 if [ -e "AIUtilities.framework/Versions/A/Resources/$LANG" ] ; then
124 silent_pushd AIUtilities.framework
/Versions
/A
/Resources
/$LANG
125 loc_copy
"$REPO/Frameworks/AIUtilities Framework/Resources/$LANG"
129 #warning: This needs to go upstream...
130 if [ -e "Growl-WithInstaller.framework/Versions/A/Resources/$LANG" ] ; then
131 silent_pushd Growl-WithInstaller.framework
/Versions
/A
/Resources
/$LANG
132 loc_copy
"$REPO/Frameworks/Growl-WithInstaller.framework/Resources/$LANG"
136 #warning: This needs to go upstream...
137 if [ -e "Sparkle.framework/Versions/A/Resources/$LANG" ] ; then
138 silent_pushd Sparkle.framework
/Versions
/A
/Resources
/$LANG
139 loc_copy
"$REPO/Frameworks/Sparkle.framework/Resources/$LANG"
148 if [ -e "Purple.AdiumPlugin/Contents/Frameworks/AdiumLibpurple.framework/Versions/A/Resources/$LANG" ] ; then
149 silent_pushd Purple.AdiumPlugin
/Contents
/Frameworks
/AdiumLibpurple.framework
/Versions
/A
/Resources
/$LANG
150 loc_copy
"$REPO/Plugins/Purple Service/$LANG"
154 if [ -e "WebKit Message View.AdiumPlugin/Contents/Resources/$LANG" ] ; then
155 silent_pushd
"WebKit Message View.AdiumPlugin/Contents/Resources/$LANG"
156 loc_copy
"$REPO/Plugins/WebKit Message View/$LANG"
164 silent_pushd Library
/Spotlight
165 if [ -e "AdiumSpotlightImporter.mdimporter/Contents/Resources/$LANG" ] ; then
166 silent_pushd AdiumSpotlightImporter.mdimporter
/Contents
/Resources
/$LANG
167 loc_copy
"$REPO/Other/Adium Spotlight Importer/$LANG"
173 if [ "$2" = "all" ] ; then
199 update_language
$lang